package com.itheima.controller;

import com.itheima.common.R;
import com.itheima.service.ReportService;
import com.itheima.service.impl.ReportServiceImpl;
import com.itheima.vo.EmpJobDataVo;
import com.itheima.vo.ReporetVo;
import com.itheima.vo.clazzCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RequestMapping("/report")
@RestController
public class ReportController {

    @Autowired
    ReportService reportService;

    @GetMapping("/empGenderData")
    public R empgenderdata() {
        List<ReporetVo> list = reportService.genderdata();
        return R.ok(list);
    }

    @GetMapping("/empJobData")
    public R jobdata() {
        EmpJobDataVo list = reportService.empjobdata();
        return R.ok(list);
    }

    @GetMapping("/studentDegreeData")
    public R studentdegree() {
        List<Map> list = reportService.studentdegree();
        return R.ok(list);
    }

    @GetMapping("/studentCountData")
    public R studentCountData(){
        clazzCountVo clazzCountVo = reportService.getStudentCountData();
        return R.ok(clazzCountVo);
    }
}
